package com.bix.util.blizfiles.m2;

import java.nio.ByteBuffer;

import com.bix.util.blizfiles.BufferUtils;
import com.jme.math.Vector3f;

public class M2Camera {
	private	int			boneId;
	private	float		fov;
	private	float		farClipping;
	private	float		nearClipping;
	private	Vector3f	translationPosition;
	private	Vector3f	cameraLocation;
	private	Vector3f	translationTarget;
	private	Vector3f	target;
	private	float[]	scaling = new float[3];
	
	public M2Camera () {
	}
	
	public M2Camera (ByteBuffer bb) {
		read (bb);
	}
	
	public void read (ByteBuffer bb) {
		int position = bb.position ();
		
		this.boneId = bb.getInt();
		this.fov = bb.getFloat();
		this.farClipping = bb.getFloat();
		this.nearClipping = bb.getFloat();
		this.translationPosition = BufferUtils.getVector3f(bb);
		this.cameraLocation = BufferUtils.getVector3f(bb);
		this.translationTarget = BufferUtils.getVector3f(bb);
		this.target = BufferUtils.getVector3f(bb);
		for (int i = 0; i < scaling.length; i++) {
			
		}
		
		bb.position (position + 0x64);
	}

	/**
	 * @return the boneId
	 */
	public int getBoneId() {
		return boneId;
	}

	/**
	 * @return the fov
	 */
	public float getFov() {
		return fov;
	}

	/**
	 * @return the farClipping
	 */
	public float getFarClipping() {
		return farClipping;
	}

	/**
	 * @return the nearClipping
	 */
	public float getNearClipping() {
		return nearClipping;
	}

	/**
	 * @return the translationPosition
	 */
	public Vector3f getTranslationPosition() {
		return translationPosition;
	}

	/**
	 * @return the cameraLocation
	 */
	public Vector3f getCameraLocation() {
		return cameraLocation;
	}

	/**
	 * @return the translationTarget
	 */
	public Vector3f getTranslationTarget() {
		return translationTarget;
	}

	/**
	 * @return the target
	 */
	public Vector3f getTarget() {
		return target;
	}

	/**
	 * @return the scaling
	 */
	public float[] getScaling() {
		return scaling;
	}
}
